package cn.thornbird.orgsync.repository;

import cn.thornbird.orgsync.entity.Task;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface TaskRepository extends BaseRepository<Task>, JpaRepository<Task, String>,
        JpaSpecificationExecutor<Task> {

    Long countByActive(Boolean active);

    Long countBySourceCompanyId(String companyId);

    Long countByTargetCompanyId(String companyId);

    List<Task> findAllByActive(boolean active);

}
